#ifndef TD_BASE_BAR_H_
#define TD_BASE_BAR_H_

/************************************************************************/
/* SDL                                                                  */
/************************************************************************/
#include "SDL/SDL.h"

/************************************************************************/
/* PROJECT                                                              */
/************************************************************************/

/************************************************************************/
/* Core                                                                 */
/************************************************************************/
#include "Core/BaseEntity.h"
#include "Core/RectangleShape.h"

using namespace TD_Core;

namespace TD_GUI {

   class BaseBar : public BaseEntity {

   protected:

      static const unsigned int backgroundOffset;

      Color m_foregroundColor;
      Color m_backgroundColor;
      SDL_Rect m_backgroundRect;
      SDL_Rect m_foregroundRect;

      Coord2D m_size;

      virtual void update(const unsigned int deltaTime);

   public:

      /************************************************************************/
      /* ctors and dtors					                                    */
      /************************************************************************/
      //Default constructor
      explicit BaseBar();

      //Copy constructor
      explicit BaseBar(const BaseBar &rhs);

      //Assignment constructor
      BaseBar& operator=(const BaseBar &rhs);

      //Initialization constructor
      explicit BaseBar(const Coord2D & barPosition, const Coord2D & barSize, 
         const Color &foregroundColor = Color::GREEN, const Color &backgroundColor = Color::BLACK);

      //Destructor
      ~BaseBar();


      /************************************************************************/
      /* Rendering functions                                                  */
      /************************************************************************/
      void render(SDL_Surface *const g_destSurface, unsigned int deltaTime);

   };
}
#endif